package com.cloud.cmt.usermanage.entity.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.cmt.usermanage.base.BaseEntity;
import com.cloud.cmt.usermanage.entity.Employee;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * User: wcy
 * Date: 2017/10/17
 * Time: 15:42
 */
@Data
@Entity
@Table(name = "organization")
public class OrganizationDetailVO extends BaseEntity<Long>{

	@JsonProperty("uplink")
	@JSONField(name = "uplink")
	private Long uplink;
	@JsonProperty("org_name")
	@JSONField(name = "org_name")
	@ApiModelProperty(name = "org_name", notes = "机构名称", example = "主管")
	private String orgName;
	@JsonProperty("remark")
	@JSONField(name = "remark")
	@ApiModelProperty(name = "remark", notes = "备注", example = "下面有一群小兵")
	private String remark;
	@ApiModelProperty(name = "org_address", notes = "机构地址", example = "杭州西湖边")
	@JSONField(name = "org_address")
	@JsonProperty("org_address")
	private String orgAddress;
	@ApiModelProperty(name = "rank", notes = "排序", example = "1")
	private Double rank;
	@JsonProperty("tenant_id")
	@JSONField(name = "tenant_id")
	@ApiModelProperty(name = "tenant_id", notes = "租户", example = "1")
	private String tenantId;
	@JsonProperty("manager")
	@JSONField(name = "manager")
	@ApiModelProperty(name = "manager", dataType = "com.cloud.cmt.usermanage.entity.Employee", notes = "部门负责人", example = "1")
	@OneToOne
	@JoinColumn(name="manager")
	private Employee manager;

}
